package cc.marcio.systems.seven.util;

import java.util.Calendar;

public class Benchmark {

	private Calendar start;
	private Calendar end;
	
	public Benchmark() {
		this.start = Calendar.getInstance();
	}
	
	public void end() {
		this.end = Calendar.getInstance();
	}
	
	public String getTime() {
		if( this.end == null ) {
			this.end();
		}
		
		long time = this.end.getTimeInMillis() - this.start.getTimeInMillis();
		return time + " millis";
	}
}